using System;
using System.Data;
using System.Collections;

namespace Company.Product.Entity
{
	/// <summary>
	/// Summary description for ThucTeChiTieu.
	/// </summary>
   public class ThucTeChiTieuList : CollectionBase
   {
      public ThucTeChiTieuList()
      {
      }

      public void Add(ThucTeChiTieu entity)
      {
         this.List.Add(entity);
      }

      public void Add(ThucTeChiTieuList list)
      {	
	foreach(ThucTeChiTieu entity in list)
	{
		this.Add(entity);
	}
      }
	
      public new virtual Enumerator GetEnumerator()
      {
         return new Enumerator(this);
      }
      public virtual ThucTeChiTieu this[int index]
      {
         get
         {
            return (ThucTeChiTieu)this.List[index];
         }
         set
         {
            this.List[index] = value;
         }
      }

	public virtual ThucTeChiTieu Find(Int32 IDChiTieu)
	{
		foreach (ThucTeChiTieu obj in this.List)
		{
			if(obj.IDChiTieu == IDChiTieu)
			{
				return obj;
			}
		}
		return null;
	}

      #region Inner Classes
      /// <summary>
      /// Type-specific enumeration class, used by LogCollection.GetEnumerator.
      /// </summary>
      public class Enumerator : IEnumerator
      {
         private IEnumerator wrapped;

         public Enumerator(ThucTeChiTieuList collection)
         {
            this.wrapped = ((CollectionBase)collection).GetEnumerator();
         }

         public ThucTeChiTieu Current
         {
            get
            {
               return (ThucTeChiTieu)(this.wrapped.Current);
            }
         }

         object IEnumerator.Current
         {
            get
            {
               return (ThucTeChiTieu)(this.wrapped.Current);
            }
         }

         public bool MoveNext()
         {
            return this.wrapped.MoveNext();
         }

         public void Reset()
         {
            this.wrapped.Reset();
         }
      }
      #endregion
   }
}